Skip to main content

Let's practice

In this short exercise we will play around with some .proto files, and try to compile them using the protoc compiler.

Our goal is to get familiar with the Protocol buffers syntax by using some of the types we talked about. We will compile the with what the compiler does, and be able to use the output in a small demo.

By walking through creating a simple example application, we will learn how to:

  • Define message formats in a .proto file.
  • Use the protocol buffer compiler.
  • Use the C# protocol buffer API to write and read messages.

Resources

  • compiler : you can get the zip file from here but I already prepared it for you:
  • the include folder of the compiler In the starting repo, you will find a folder named: BasicSyntax that contains a ConsoleApp project. Inside it, you will see the protoc.exe and the resources